<template>
  <avue-crud :data="data" :option="option"></avue-crud>
</template>
<script>
export default {
  data() {
    return {
      data: [
      ],
      option: {
        index: true,
        indexLabel: "序号",
        page: false,
        align: "center",
        menu: false,
        header: false,
        menuAlign: "center",
        column: [
          {
            label: "商品名称",
            prop: "goodsName"
          },
          {
            label: "商品规格",
            prop: "goodsAttributeName"
          },
          {
            label: "商品单价",
            prop: "payGoodsPrice"
          },
          {
            label: "购买数量",
            prop: "payGoodsNum"
          }
        ]
      }
    };
  },
 methods: {
        getDetail(){
            detail(this.$route.query.id).then(val => {
              this.data = val.data.data.goods
            })
        }
    },
    created() {
        this. getDetail()
    }
};
</script>